#include "debug.h"
#include "ui_debug.h"
#include "bookstore.h"


deBug::deBug(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::deBug) {
    ui->setupUi(this);

    showStuInfoUI = new show_stuinfo(this);
    showStuInfoUI->hide();
    showMenuListUI = new show_menulist(this);
    showMenuListUI->hide();
    addMenuUI = new debug_addMenu(this);
    addMenuUI->hide();
    addBookUI = new debug_addbook(this);
    addBookUI->hide();
    addRecordUI = new debug_addRecord(this);
    addRecordUI->hide();
    showBookListUI = new debug_show_bookList(this);
    showBookListUI->hide();
    showRecordListUI = new debug_show_recordlist(this);
    showRecordListUI->hide();
    borrowBookUI = new debug_borrowBook(this);
    borrowBookUI->hide();
    returnBookUI = new debug_returnBook(this);
    returnBookUI->hide();
    showstulistUI = new show_stulist(this);
    showstulistUI->hide();
    deleteUI = new debug_delete(this);
    deleteUI->hide();
    ui->pushButton->hide();
    ui->pushButton->setEnabled(false);
    ui->pushButton_3->hide();
    ui->pushButton_3->setEnabled(false);
    ui->pushButton_4->hide();
    ui->pushButton_4->setEnabled(false);
    ui->pushButton_6->hide();
    ui->pushButton_6->setEnabled(false);
    ui->pushButton_8->hide();
    ui->pushButton_8->setEnabled(false);
    ui->pushButton_9->hide();
    ui->pushButton_9->setEnabled(false);
    ui->pushButton_11->hide();
    ui->pushButton_11->setEnabled(false);
}

deBug::~deBug() {
    delete ui;
}

void deBug::on_pushButton_clicked() {
    showStuInfoUI->open();
}

void deBug::on_pushButton_2_clicked() {
    showMenuListUI->open();
}

void deBug::on_pushButton_3_clicked() {
    addMenuUI->open();
}

void deBug::on_pushButton_4_clicked() {
    addBookUI->open();
}

void deBug::on_pushButton_5_clicked() {
    showBookListUI->open();
}

void deBug::on_pushButton_6_clicked() {
    addRecordUI->open();
}

void deBug::on_pushButton_7_clicked() {
    showRecordListUI->open();
}

void deBug::on_pushButton_8_clicked() {
    borrowBookUI->open();
}

void deBug::on_pushButton_9_clicked() {
    returnBookUI->open();
}

void deBug::on_pushButton_10_clicked() {
    showstulistUI->open();
}

void deBug::on_pushButton_11_clicked() {
    deleteUI->open();
}
